import axios from 'axios'


axios.defaults.baseURL = 'http://localhost:8888'

axios.interceptors.request.use(function (config) {

  return config
}, function (error) {
  return Promise.reject(error)
})

axios.interceptors.response.use(function (response) {
  return response.data //响应成功
}, function (error) { //响应失败

  return Promise.reject(error)
})

export default axios